package com.kakarote.examine.constant;


//当同一个审批人重复审批同一单据时处理类型1:仅首个节点需审批，其余自动同意2:仅连续审批时自动同意3:每个节点都需要审批

import java.util.Objects;

public enum RepeatHandleTypeEnum {

    //1:仅首个节点需审批，其余自动同意
    ONLY_FIRST_NODE(1),
    //2:仅连续审批时自动同意
    ONLY_SERIES_NODE(2),
    //3:每个节点都需要审批
    ALL_NODE(3);

    private RepeatHandleTypeEnum(Integer type) {
        this.type = type;
    }

    private Integer type;

    public Integer getType() {
        return type;
    }

    public static RepeatHandleTypeEnum valueOf(Integer type) {
        for (RepeatHandleTypeEnum repeatHandleTypeEnum : values()) {
            if (Objects.equals(type, repeatHandleTypeEnum.getType())) {
                return repeatHandleTypeEnum;
            }
        }
        return null;
    }
}
